#include<iostream>

char* buildstr(char ch,int n);

int main()
{
    using namespace std;
    char ch;
    int times = 0;
    cout << "Input a characpter:";
    cin >> ch;
    cout << "Input times:";
    cin >> times;
    char* ps = buildstr(ch,times);

    cout << ps << endl;
    delete[] ps;
    
    return 0;
}


char* buildstr(char ch,int n)
{
    char* ptr = new char[n+1];
    ptr[n] = '\0';
    while(n-- > 0)
    {
        ptr[n] = ch;
    }
    return ptr;

}